import request from "@/utils/request";

export function getList(method, data) {
  if (method == "post") {
    return request({
      url: "/building/roomlist",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/building/roomlist",
      method: method,
      params: data,
    });
  }
}
export function getIotControl(method, data) {
  if (method == "post") {
    return request({
      url: "/iot/login",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/iot/login",
      method: method,
      params: data,
    });
  }
}

export function iotLogupdate(method, data) {
  if (method == "post") {
    return request({
      url: "/iot/logupdate",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/iot/logupdate",
      method: method,
      params: data,
    });
  }
}

export function bedupdate(method, data) {
  if (method == "post") {
    return request({
      url: "/elderfees/bed",
      method: method,
      data,
    });
  } else {
    return request({
      url: "/elderfees/bed",
      method: method,
      params: data,
    });
  }
}

